import vnode from "./vnode.js";
export default function (sel, data, params) {
    // string 没有子元素
    if (typeof params == 'string') {
        return vnode(sel, data, undefined, params, undefined)
    } else if(Array.isArray(params)){
        // 数组则遍历成children传递给第三个参数
        // console.log(params)
        let children = []
        for (const item of params) {
            children.push(item)
        }
        return vnode(sel, data, children, undefined, undefined)
    }
}